"use strict";
let arr1;
let arr2;
let arr3;
arr1 = ['hello', 200];
arr2 = ['hello', false];
arr3 = [100, 'a', 'b', 'c'];
console.log(arr1, arr2, arr3);
function walk(str) {
    if (str === 'up') {
        console.log('向[上]走');
    }
    else if (str === 'down') {
        console.log('向[下]走');
    }
    else if (str === 'left') {
        console.log('向[左]走');
    }
    else if (str === 'right') {
        console.log('向[右]走');
    }
    else {
        console.log('未知方向');
    }
}
walk('up');
walk('down');
walk('left');
walk('right');
// 枚举
var Direction;
(function (Direction) {
    Direction[Direction["Up"] = 0] = "Up";
    Direction[Direction["Down"] = 1] = "Down";
    Direction[Direction["Left"] = 2] = "Left";
    Direction[Direction["Right"] = 3] = "Right";
})(Direction || (Direction = {}));
console.log(Direction);
function walkEnum(data) {
    if (data === Direction.Up) {
        console.log('向[上]走');
    }
    else if (data === Direction.Down) {
        console.log('向[下]走');
    }
    else if (data === Direction.Left) {
        console.log('向[左]走');
    }
    else if (data === Direction.Right) {
        console.log('向[右]走');
    }
    else {
        console.log('未知方向');
    }
}
// walkEnum('up') //Argument of type '"up"' is not assignable to parameter of type 'Direction'
walkEnum(Direction.Up);
// 枚举
var Direction1;
(function (Direction1) {
    Direction1[Direction1["Up"] = 5] = "Up";
    Direction1[Direction1["Down"] = 12] = "Down";
    Direction1[Direction1["Left"] = 13] = "Left";
    Direction1[Direction1["Right"] = 14] = "Right";
})(Direction1 || (Direction1 = {}));
console.log(Direction1, '数字枚举');
// 字符串枚举
var Direction2;
(function (Direction2) {
    Direction2["Up"] = "1";
    Direction2["Down"] = "2";
    Direction2["Left"] = "3";
    Direction2["Right"] = "4";
})(Direction2 || (Direction2 = {}));
console.log(Direction2, '字符串枚举');
let x = 0 /* Direction3.Up */;
